<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
    
    <c:if test="${id==null }">
     <form method="post" action="${APP_PATH}/pharmaceutical/addPharmaceutical/${factoryId}" enctype="multipart/form-data">
		  <div class="form-group">
		    <label >药品名</label>
		  
		    <input type="text" name="name" >
		
		  </div>

		  
 		  <div class="form-group" >
		    <label >药品封面</label>
		    <input type="file" name="file" >
		  </div> 
<!-- 		  <div>
		  	    上传<input type="file" name="file"><br><br>
         </div> -->
		  

		  <button type="submit" value="上传">提交</button>
    </form>
    </c:if>
        <c:if test="${id!=null }">
     <form method="post" action="${APP_PATH}/pharmaceutical/edit/${id}/${factoryId}" enctype="multipart/form-data">
		  <div class="form-group">
		    <label >药品名</label>
		  
		    <input type="text" name="name" value="${pharmaceutical.name }">
		
		  </div>
		 
 		  <div class="form-group" >
		    <label >药品封面</label>
		    <input type="file" name="file" value="${pharmaceutical.cover }" >
		  </div> 
<!-- 		  <div>
		  	    上传<input type="file" name="file"><br><br>
         </div> -->
		  

		  <button type="submit" value="上传">提交</button>
    </form>
    </c:if>

</body>
</html>